import 'package:flutter/material.dart';

class AnchorModel {
  late int index;
  AnchorModel({required this.index});
  double? off;

  void getOff(BuildContext context, GlobalKey key) {
    if (off != null) return;

    final box = key.currentContext?.findRenderObject() as RenderBox;
    final p = box.localToGlobal(Offset.zero);
    off = p.dy;
  }
}
